/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package central.server;

import java.util.Scanner;

/**
 *
 * @author mire
 */
public class CentralServerMain {

    public static void main(String[] args) {
        CentralServer centralServer = null;


        if (CentralServer.existsConfugration()) {
            centralServer = new CentralServer();
        } else {

            Scanner in = new Scanner(System.in);

                System.out.println("Unesite port:");
                int operatorPort = in.nextInt();

                System.out.println("Unesite vreme provere u sekundama:");
                int aliveTimeout = in.nextInt();

                System.out.println("uneli ste: " + operatorPort + " i " + aliveTimeout);

                centralServer = new CentralServer(operatorPort, aliveTimeout);

        }

        (new Thread(centralServer)).start();

    }
}
